package com.xxx.user.api;


import com.xxx.common.base.bo.ListResult;
import com.xxx.user.dto.RoleCreateReqDTO;
import com.xxx.user.dto.RoleGetAllReqDTO;
import com.xxx.user.dto.RoleGetAllResDTO;
import com.xxx.user.dto.RoleUpdateReqDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "xxx-user-service")
public interface RoleApi {

    /*** 创建 */
    @PostMapping("v1/role/create")
    String create(@RequestBody RoleCreateReqDTO param);

    /*** 更新 */
    @PutMapping("v1/role/update")
    String update(@RequestBody RoleUpdateReqDTO param);

    /*** 删除 */
    @DeleteMapping("v1/role/delete")
    String delete(@RequestBody List<Long> ids);

    /*** 获取全部数据 */
    @GetMapping("v1/role/getAll")
    ListResult<RoleGetAllResDTO> getAll(@SpringQueryMap RoleGetAllReqDTO param);

}
